%
O08704(POLAR*TO*CARTESIAN)
(N-9967-2600-01) 
(COPYRIGHT*2024*RENISHAW*PLC.*ALL*RIGHTS*RESERVED) 

(WARNING!)
(Renishaw cannot guarantee that the part programs supplied are)
(correct.  Anyone using the part programs supplied by Renishaw)
(must ensure that the programs are suitable for the machine/controller)
(on which they are used.  Part programs should only be run by personnel)
(who are fully familiar with the machine, the controller and the)
(operation of all guards, interlocks and emergency stop switches.)
(It is recommended that programs are initially tested at low speed using)
(the feedrate override control.)

(G53)(READ AHEAD CODE) (%Had to comment out for Haas NGC )
G103P1 (READ AHEAD LIMIT CODE FOR HAAS)

IF[#1NE#0]GOTO20 
 
#105=#0
#103=[#18*[COS[#11]]*[COS[#20]]] 
#104=[#18*[COS[#11]]*[SIN[#20]]] 
G65P8704A1.
IF[#11EQ#0]GOTO10
#105=[#18*[SIN[#11]]]
N10
G65P8704A1.
 
N20
 
M99

%